Command Message Format

To give the HSM an instruction, the Host application must assemble a message containing all the necessary information and send it to the HSM as a sequence of characters on the communications link. In general, each command consists of the following fields:

·         Start of text character.

·         Message header.

·         Command code.

·         Data elements.

·         Message trailer.

·         End of text character.

 

 
                                          

 

Start of Text Character

The Start of Text (STX) character indicates the start of a valid message. The ASCII and EBCDIC value is X'02. The STX character is not used in SNA-SDLC, ESCON or TCP/IP environments.

Message Header

The message header field can be any length from 1 to 255 characters (1 to 100 for SNA/SDLC), and it is configured at HSM installation. It can contain any printable characters and the HSM returns them unmodified in the response message.

It can be used to label commands and their responses for systems that implement batch queues or which multi-thread commands.

Command Code

Every command has a unique two-character command code. The command codes are detailed in the Host Command Reference Manual.

Data

Most HSM commands require data, often including cryptographic keys. Details of the data for each command can be found in the Host Command Reference Manual.

Message Trailer

The message trailer (EM) is an additional variable-length field (to a maximum of 32 characters), which can be used to pass additional details required by the Host for further processing. The field should always be preceded by the EM control character; ASCII and EBCDIC value is X'19.

The data in this field can be any printable character, and it is returned in the response message unchanged.

End of Text Character

The End of Text (ETX) character indicates the end of command data. The HSM ignores any data received after the ETX and before the next STX. The ETX character is not used in SNA-SDLC, ESCON or TCP/IP environments.

The ASCII and EBCDIC value is X'03.